<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        const arr = [1,2,3]
        arr.forEach(function(){
            console.log(this ) // 指向window，因为回调函数里面的this指向window
        })
      

        const obj = {
            uname : 'zs',
            age : 19
        }
       const timer = setTimeout(function(){
        console.log(this) // 用bind改变this指向，因为用call，apply会立即调用 改后的指向obj
       }.bind(obj),2000)
    </script>
</body>
</html>